<div class="mainer">
  <div class="container-fluid">
    <div class="col-md-7 col-lg-7 col-center-block content-wrap" >
      <section class="posts-collection-expand" id="posts-collection">
        <span class="archive-move-on"></span>

        <% if @articles_total_size %>
          <%= content_tag :span, t('article.other', size: @articles_total_size), class: 'archive-page-counter'  %>
        <% else %>
          <%= content_tag :span, t('article.zero'), class: 'archive-page-counter' %>
        <% end %>
        
        <% unless yield(:sub_title_content).blank? %>
          <div class="collection-title" >
            <h2><%= yield :sub_title_content %> <%= content_tag :span, yield(:sub_title_suffix), class: 'text-muted', style: 'font-size: 16px;' %><span class="type"></span>
            </h2>
          </div>          
        <% end %>

        <!-- 按发布年分类 -->
        <% @articles_by_year.each do | articles_by_year | %>
          <div class="collection-title" >
            <h2><%= articles_by_year[0] %><span class="type"></span>
            </h2>
          </div>
          <% articles_by_year[1].each do | article | %>
            <article class="post">
              <header class="post-header">
                <h1 class="post-title">
                <%= link_to article.title, article_path(article), class: 'post-title-link-no-underline' %>
                </h1>
                <div class="post-meta">
                  <%= mtime_tag article.created_at, strf: '%m-%d', opts: {class: 'post-time'} %>
                </div>
              </header>
            </article>
          <% end %>
        <% end %>
      </section>
      <!-- 分页栏 -->
      <%= will_paginate @paginated_articles, renderer: WillPaginate::ActionView::BlogLinkRenderer %>
    </div>
  </div>
</div>
<%= javascript_include_tag 'archive' %>